package com.tianqu.tms.dao;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

import com.tianqu.tms.core.exception.TmsDaoException;
import com.tianqu.tms.dto.TmsDetectNormalDto;

/**
 * 检测信息操作DAOImp
 * @author liudianyong
 *
 */
public class TmsDetectNormalDaoImp extends TmsDao implements TmsDetectNormalDao  {
     protected TmsDetectNormalDaoImp() throws TmsDaoException {
		super();
	}
     
	/**
     * 删除车辆检测信息
     * @param id
     * @throws TmsDaoException
     */
	@Override
	public void delDetectNormal(int id) throws TmsDaoException {
		PreparedStatement ps = null;
		ResultSet rs = null;
		try {
			StringBuffer sql = new StringBuffer("DELETE FROM  ");
			sql.append(TmsTableNames.TMS_DETECT_NORMAL);
			sql.append(" WHERE  ");
			sql.append(" ID=?  ");
			ps = conn.prepareStatement(sql.toString());
			ps.setInt(1, id);
			ps.executeUpdate();	
			
		} catch (SQLException e) {
			throw new TmsDaoException(e.toString());
		} finally {
			super.close(rs, ps);
		}
	}

	/**
	 * 更新检测报告信息 需要传一个ID进来
	 * @throws TmsDaoException 
	 */
	@Override
	public void updateDetectNormalInfo(TmsDetectNormalDto dto) throws TmsDaoException {
		PreparedStatement ps = null;
		ResultSet rs = null;
		try { 
			StringBuffer sql = new StringBuffer(" UPDATE  ");
			sql.append(TmsTableNames.TMS_DETECT_NORMAL);
			sql.append(" SET  ");
			sql.append(" DISASTERCARS = ?,  	");
			sql.append(" FRONTLEFTCHK1 = ?,  	");
			sql.append(" FRONTLEFTCHK2 = ?,  	");
			sql.append(" FRONTLEFTCHK3 = ?,  	");
			sql.append(" FRONTLEFTCHK4 = ?,  	");
			sql.append(" FRONTLEFTCHK5 = ?, 	");
			sql.append(" FRONTLEFTCHK6 = ?,  	");
			sql.append(" FRONTLEFTCHK7 = ?,  	");
			sql.append(" FRONTLEFTCHK8 = ?,  	");
			sql.append(" FRONTLEFTCHK9 = ?,  	");
			sql.append(" INSIDECHK1 = ?,  		");
			sql.append(" INSIDECHK2 = ?,  		");
			sql.append(" INSIDECHK3 = ?,  		");
			sql.append(" INSIDECHK4 = ?,  		");
			sql.append(" INSIDECHK5 = ?,  		");
			sql.append(" INSIDECHK6 = ?,  		");
			sql.append(" INSIDECHK7 = ?,  		");
			sql.append(" INSIDECHK8 = ?,  		");
			sql.append(" INSIDECHK9 = ?,  		");
			sql.append(" INSIDECHK10 = ?,  		");
			sql.append(" INSIDECHK11 = ?,  		");
			sql.append(" INSIDECHK12 = ?,  		");
			sql.append(" INSIDECHK13 = ?,  		");
			sql.append(" INSIDECHK14 = ?,  		");
			sql.append(" INSIDECHK15 = ?,  		");
			sql.append(" INSIDECHK16 = ?,  		");
			sql.append(" INSIDECHK17 = ?,  		");
			sql.append(" INSIDECHK18 = ?,  		");
			sql.append(" INSIDECHK19 = ?,  		");
			sql.append(" INSIDECHK20 = ?,  		");
			sql.append(" INSIDECHK21 = ?,  		");
			sql.append(" INSIDECHK22 = ?,  		");
			sql.append(" INSIDECHK23 = ?,  		");
			sql.append(" INSIDECHK24 = ?,  		");
			sql.append(" INSIDECHK25 = ?,  		");
			sql.append(" INSIDECHK26 = ?,  		");
			sql.append(" INSIDECHK27 = ?,  		");
			sql.append(" INSIDECHK28 = ?,  		");
			sql.append(" INSIDECHK29 = ?,  		");
			sql.append(" INSIDECHK30 = ?,  		");
			sql.append(" PANELFENERLHCHK1 = ?,  ");
			sql.append(" PANELFENERLHCHK2 = ?,  ");
			sql.append(" PANELFENERLHCHK3 = ?,  ");
			sql.append(" PANELFENERLHCHK4 = ?,  ");
			sql.append(" PANELFENERLHCHK5 = ?,  ");
			sql.append(" PANELFENERLHCHK6 = ?,  ");
			sql.append(" DEADAHEADCHK1 = ?,  	");
			sql.append(" DEADAHEADCHK2 = ?,  	");
			sql.append(" DEADAHEADCHK3 = ?,  	");
			sql.append(" DEADAHEADCHK4 = ?,  	");
			sql.append(" DEADAHEADCHK5 = ?,  	");
			sql.append(" DEADAHEADCHK6 = ?,  	");
			sql.append(" ENGINECHK1 = ?,  		");
			sql.append(" ENGINECHK2 = ?,  		");
			sql.append(" ENGINECHK3 = ?,  		");
			sql.append(" ENGINECHK4 = ?,  		");
			sql.append(" ENGINECHK5 = ?,  		");
			sql.append(" ENGINECHK6 = ?,  		");
			sql.append(" ENGINECHK7 = ?,  		");
			sql.append(" ENGINECHK8 = ?,  		");
			sql.append(" PANELFENERRHCHK1 = ?,  ");
			sql.append(" PANELFENERRHCHK2 = ?,  ");
			sql.append(" PANELFENERRHCHK3 = ?,  ");
			sql.append(" PANELFENERRHCHK4 = ?,  ");
			sql.append(" PANELFENERRHCHK5 = ?,  ");
			sql.append(" PANELFENERRHCHK6 = ?,  ");
			sql.append(" FRONTRIGHTCHK1 = ?,  	");
			sql.append(" FRONTRIGHTCHK2 = ?,  	");
			sql.append(" FRONTRIGHTCHK3 = ?,  	");
			sql.append(" FRONTRIGHTCHK4 = ?,  	");
			sql.append(" FRONTRIGHTCHK5 = ?,  	");
			sql.append(" FRONTRIGHTCHK6 = ?,  	");
			sql.append(" FRONTRIGHTCHK7 = ?,  	");
			sql.append(" FRONTRIGHTCHK8 = ?,  	");
			sql.append(" FRONTRIGHTCHK9 = ?,  	");
			sql.append(" FRONTRIGHTCHK10 = ?,  	");
			sql.append(" FRONTRIGHTCHK11 = ?,  	");
			sql.append(" FRONTRIGHTCHK12 = ?,  	");
			sql.append(" FRONTRIGHTCHK13 = ?,  	");
			sql.append(" REARRIGHTCHK1 = ?,  	");
			sql.append(" REARRIGHTCHK2 = ?,  	");
			sql.append(" REARRIGHTCHK3 = ?,  	");
			sql.append(" REARRIGHTCHK4 = ?,  	");
			sql.append(" REARRIGHTCHK5 = ?,  	");
			sql.append(" REARRIGHTCHK6 = ?,  	");
			sql.append(" REARRIGHTCHK7 = ?,  	");
			sql.append(" REARRIGHTCHK8 = ?,  	");
			sql.append(" REARRIGHTCHK9 = ?,  	");
			sql.append(" REARRIGHTCHK10 = ?,  	");
			sql.append(" REARRIGHTCHK11 = ?,  	");
			sql.append(" FENDERRACHK1 = ?,  	");
			sql.append(" FENDERRACHK2 = ?,  	");
			sql.append(" FENDERRACHK3 = ?,  	");
			sql.append(" FENDERRACHK4 = ?,  	");
			sql.append(" FENDERRACHK5 = ?,  	");
			sql.append(" FENDERRACHK6 = ?,  	");
			sql.append(" RIGHTASTERNCHK1 = ?,  	");
			sql.append(" RIGHTASTERNCHK2 = ?,  	");
			sql.append(" RIGHTASTERNCHK3 = ?,  	");
			sql.append(" RIGHTASTERNCHK4 = ?,  	");
			sql.append(" RIGHTASTERNCHK5 = ?,  	");
			sql.append(" RIGHTASTERNCHK6 = ?,  	");
			sql.append(" LUGGAGECHK1 = ?,  		");
			sql.append(" LUGGAGECHK2 = ?,  		");
			sql.append(" LUGGAGECHK3 = ?,  		");
			sql.append(" LUGGAGECHK4 = ?,  		");
			sql.append(" LUGGAGECHK5 = ?,  		");
			sql.append(" LUGGAGECHK6 = ?,  		");
			sql.append(" LUGGAGECHK7 = ?,  		");
			sql.append(" LUGGAGECHK8 = ?,  		");
			sql.append(" LUGGAGECHK9 = ?,  		");
			sql.append(" LUGGAGECHK10 = ?,  	");
			sql.append(" FENDERLACHK1 = ?,  	");
			sql.append(" FENDERLACHK2 = ?,  	");
			sql.append(" FENDERLACHK3 = ?,  	");
			sql.append(" FENDERLACHK4 = ?,  	");
			sql.append(" FENDERLACHK5 = ?,  	");
			sql.append(" FENDERLACHK6 = ?,  	");
			sql.append(" REARLEFTCHK1 = ?,  	");
			sql.append(" REARLEFTCHK2 = ?,  	");
			sql.append(" REARLEFTCHK3 = ?,  	");
			sql.append(" REARLEFTCHK4 = ?,  	");
			sql.append(" REARLEFTCHK5 = ?,  	");
			sql.append(" REARLEFTCHK6 = ?,  	");
			sql.append(" REARLEFTCHK7 = ?,  	");
			sql.append(" REARLEFTCHK8 = ?,  	");
			sql.append(" REARLEFTCHK9 = ?,  	");
			sql.append(" REARLEFTCHK10 = ?,  	");
			sql.append(" REARLEFTCHK11 = ?,  	");
			sql.append(" CARROOFCHK1 = ?,  		");
			sql.append(" EXTERNALGRADE = ?,  	");
			sql.append(" INTERNALGRADE = ?,  	");
			sql.append(" ENGINEGRADE = ?,  		");
			sql.append(" ELECTRINICSGRADE = ?,  ");
			sql.append(" RESTSGRADE = ?  		");
			sql.append("  WHERE ID=?  			");
			
			ps = conn.prepareStatement(sql.toString());
			ps.setString(1, dto.getDisasterCars());
			ps.setString(2, dto.getFrontLeftChk1());
			ps.setString(3, dto.getFrontLeftChk2());
			ps.setString(4, dto.getFrontLeftChk3());
			ps.setString(5, dto.getFrontLeftChk4());
			ps.setString(6, dto.getFrontLeftChk5());
			ps.setString(7, dto.getFrontLeftChk6());
			ps.setString(8, dto.getFrontLeftChk7());
			ps.setString(9, dto.getFrontLeftChk8());
			ps.setString(10, dto.getFrontLeftChk9());
			ps.setString(11, dto.getInsideChk1());
			ps.setString(12, dto.getInsideChk2());
			ps.setString(13, dto.getInsideChk3());
			ps.setString(14, dto.getInsideChk4());
			ps.setString(15, dto.getInsideChk5());
			ps.setString(16, dto.getInsideChk6());
			ps.setString(17, dto.getInsideChk7());
			ps.setString(18, dto.getInsideChk8());
			ps.setString(19, dto.getInsideChk9());
			ps.setString(20, dto.getInsideChk10());
			ps.setString(21, dto.getInsideChk11());
			ps.setString(22, dto.getInsideChk12());
			ps.setString(23, dto.getInsideChk13());
			ps.setString(24, dto.getInsideChk14());
			ps.setString(25, dto.getInsideChk15());
			ps.setString(26, dto.getInsideChk16());
			ps.setString(27, dto.getInsideChk17());
			ps.setString(28, dto.getInsideChk18());
			ps.setString(29, dto.getInsideChk19());
			ps.setString(30, dto.getInsideChk20());
			ps.setString(31, dto.getInsideChk21());
			ps.setString(32, dto.getInsideChk22());
			ps.setString(33, dto.getInsideChk23());
			ps.setString(34, dto.getInsideChk24());
			ps.setString(35, dto.getInsideChk25());
			ps.setString(36, dto.getInsideChk26());
			ps.setString(37, dto.getInsideChk27());
			ps.setString(38, dto.getInsideChk28());
			ps.setString(39, dto.getInsideChk29());
			ps.setString(40, dto.getInsideChk30());
			ps.setString(41, dto.getPanelFenerLhChk1());
			ps.setString(42, dto.getPanelFenerLhChk2());
			ps.setString(43, dto.getPanelFenerLhChk3());
			ps.setString(44, dto.getPanelFenerLhChk4());
			ps.setString(45, dto.getPanelFenerLhChk5());
			ps.setString(46, dto.getPanelFenerLhChk6());
			ps.setString(47, dto.getDeadAheadChk1());
			ps.setString(48, dto.getDeadAheadChk2());
			ps.setString(49, dto.getDeadAheadChk3());
			ps.setString(50, dto.getDeadAheadChk4());
			ps.setString(51, dto.getDeadAheadChk5());
			ps.setString(52, dto.getDeadAheadChk6());
			ps.setString(53, dto.getEngineChk1());
			ps.setString(54, dto.getEngineChk2());
			ps.setString(55, dto.getEngineChk3());
			ps.setString(56, dto.getEngineChk4());
			ps.setString(57, dto.getEngineChk5());
			ps.setString(58, dto.getEngineChk6());
			ps.setString(59, dto.getEngineChk7());
			ps.setString(60, dto.getEngineChk8());
			ps.setString(61, dto.getPanelFenerRhChk1());
			ps.setString(62, dto.getPanelFenerRhChk2());
			ps.setString(63, dto.getPanelFenerRhChk3());
			ps.setString(64, dto.getPanelFenerRhChk4());
			ps.setString(65, dto.getPanelFenerRhChk5());
			ps.setString(66, dto.getPanelFenerRhChk6());
			ps.setString(67, dto.getFrontRightChk1());
			ps.setString(68, dto.getFrontRightChk2());
			ps.setString(69, dto.getFrontRightChk3());
			ps.setString(70, dto.getFrontRightChk4());
			ps.setString(71, dto.getFrontRightChk5());
			ps.setString(72, dto.getFrontRightChk6());
			ps.setString(73, dto.getFrontRightChk7());
			ps.setString(74, dto.getFrontRightChk8());
			ps.setString(75, dto.getFrontRightChk9());
			ps.setString(76, dto.getFrontRightChk10());
			ps.setString(77, dto.getFrontRightChk11());
			ps.setString(78, dto.getFrontRightChk12());
			ps.setString(79, dto.getFrontRightChk13());
			ps.setString(80, dto.getRearRightChk1());
			ps.setString(81, dto.getRearRightChk2());
			ps.setString(82, dto.getRearRightChk3());
			ps.setString(83, dto.getRearRightChk4());
			ps.setString(84, dto.getRearRightChk5());
			ps.setString(85, dto.getRearRightChk6());
			ps.setString(86, dto.getRearRightChk7());
			ps.setString(87, dto.getRearRightChk8());
			ps.setString(88, dto.getRearRightChk9());
			ps.setString(89, dto.getRearRightChk10());
			ps.setString(90, dto.getRearRightChk11());
			ps.setString(91, dto.getFenderRaChk1());
			ps.setString(92, dto.getFenderRaChk2());
			ps.setString(93, dto.getFenderRaChk3());
			ps.setString(94, dto.getFenderRaChk4());
			ps.setString(95, dto.getFenderRaChk5());
			ps.setString(96, dto.getFenderRaChk6());
			ps.setString(97, dto.getRightAsternChk1());
			ps.setString(98, dto.getRightAsternChk2());
			ps.setString(99, dto.getRightAsternChk3());
			ps.setString(100, dto.getRightAsternChk4());
			ps.setString(101, dto.getRightAsternChk5());
			ps.setString(102, dto.getRightAsternChk6());
			ps.setString(103, dto.getLuggageChk1());
			ps.setString(104, dto.getLuggageChk2());
			ps.setString(105, dto.getLuggageChk3());
			ps.setString(106, dto.getLuggageChk4());
			ps.setString(107, dto.getLuggageChk5());
			ps.setString(108, dto.getLuggageChk6());
			ps.setString(109, dto.getLuggageChk7());
			ps.setString(110, dto.getLuggageChk8());
			ps.setString(111, dto.getLuggageChk9());
			ps.setString(112, dto.getLuggageChk10());
			ps.setString(113, dto.getFenderLaChk1());
			ps.setString(114, dto.getFenderLaChk2());
			ps.setString(115, dto.getFenderLaChk3());
			ps.setString(116, dto.getFenderLaChk4());
			ps.setString(117, dto.getFenderLaChk5());
			ps.setString(118, dto.getFenderLaChk6());
			ps.setString(119, dto.getRearLeftChk1());
			ps.setString(120, dto.getRearLeftChk2());
			ps.setString(121, dto.getRearLeftChk3());
			ps.setString(122, dto.getRearLeftChk4());
			ps.setString(123, dto.getRearLeftChk5());
			ps.setString(124, dto.getRearLeftChk6());
			ps.setString(125, dto.getRearLeftChk7());
			ps.setString(126, dto.getRearLeftChk8());
			ps.setString(127, dto.getRearLeftChk9());
			ps.setString(128, dto.getRearLeftChk10());
			ps.setString(129, dto.getRearLeftChk11());
			ps.setString(130, dto.getCarRoofChk1());
			ps.setInt(131, (int)dto.getExternalGrade());
			ps.setInt(132, (int)dto.getInternalGrade());
			ps.setInt(133, (int)dto.getEngineGrade());
			ps.setInt(134, (int)dto.getElectrinicsGrade());
			ps.setInt(135, (int)dto.getRestsGrade());
			ps.setInt(136, dto.getId());
			
			ps.executeUpdate();	

		} catch (SQLException e) {
			throw new TmsDaoException(e.toString());
		} finally {
			super.close(rs, ps);
		}		
		
	}

	/**
	 * 
	 * 检测报告录入,录入完时候返回一个主键ID即检测ID，用于更新基本信息表和图片表
	 * @throws TmsDaoException 
	 */
	@Override
	public int insertDetectNormalInfo(TmsDetectNormalDto dto) throws TmsDaoException {
		PreparedStatement ps = null;
		ResultSet rs = null;
		int carDetectId = 0;
		try { 
			StringBuffer sql = new StringBuffer("INSERT INTO  ");
			sql.append(TmsTableNames.TMS_DETECT_NORMAL);
			sql.append(" (  ");
			sql.append(" DISASTERCARS,  ");
			sql.append(" FRONTLEFTCHK1,  ");
			sql.append(" FRONTLEFTCHK2,  ");
			sql.append(" FRONTLEFTCHK3,  ");
			sql.append(" FRONTLEFTCHK4,  ");
			sql.append(" FRONTLEFTCHK5, ");
			sql.append(" FRONTLEFTCHK6,  ");
			sql.append(" FRONTLEFTCHK7,  ");
			sql.append(" FRONTLEFTCHK8,  ");
			sql.append(" FRONTLEFTCHK9,  ");
			sql.append(" INSIDECHK1,  ");
			sql.append(" INSIDECHK2,  ");
			sql.append(" INSIDECHK3,  ");
			sql.append(" INSIDECHK4,  ");
			sql.append(" INSIDECHK5,  ");
			sql.append(" INSIDECHK6,  ");
			sql.append(" INSIDECHK7,  ");
			sql.append(" INSIDECHK8,  ");
			sql.append(" INSIDECHK9,  ");
			sql.append(" INSIDECHK10,  ");
			sql.append(" INSIDECHK11,  ");
			sql.append(" INSIDECHK12,  ");
			sql.append(" INSIDECHK13,  ");
			sql.append(" INSIDECHK14,  ");
			sql.append(" INSIDECHK15,  ");
			sql.append(" INSIDECHK16,  ");
			sql.append(" INSIDECHK17,  ");
			sql.append(" INSIDECHK18,  ");
			sql.append(" INSIDECHK19,  ");
			sql.append(" INSIDECHK20,  ");
			sql.append(" INSIDECHK21,  ");
			sql.append(" INSIDECHK22,  ");
			sql.append(" INSIDECHK23,  ");
			sql.append(" INSIDECHK24,  ");
			sql.append(" INSIDECHK25,  ");
			sql.append(" INSIDECHK26,  ");
			sql.append(" INSIDECHK27,  ");
			sql.append(" INSIDECHK28,  ");
			sql.append(" INSIDECHK29,  ");
			sql.append(" INSIDECHK30,  ");
			sql.append(" PANELFENERLHCHK1,  ");
			sql.append(" PANELFENERLHCHK2,  ");
			sql.append(" PANELFENERLHCHK3,  ");
			sql.append(" PANELFENERLHCHK4,  ");
			sql.append(" PANELFENERLHCHK5,  ");
			sql.append(" PANELFENERLHCHK6,  ");
			sql.append(" DEADAHEADCHK1,  ");
			sql.append(" DEADAHEADCHK2,  ");
			sql.append(" DEADAHEADCHK3,  ");
			sql.append(" DEADAHEADCHK4,  ");
			sql.append(" DEADAHEADCHK5,  ");
			sql.append(" DEADAHEADCHK6,  ");
			sql.append(" ENGINECHK1,  ");
			sql.append(" ENGINECHK2,  ");
			sql.append(" ENGINECHK3,  ");
			sql.append(" ENGINECHK4,  ");
			sql.append(" ENGINECHK5,  ");
			sql.append(" ENGINECHK6,  ");
			sql.append(" ENGINECHK7,  ");
			sql.append(" ENGINECHK8,  ");
			sql.append(" PANELFENERRHCHK1,  ");
			sql.append(" PANELFENERRHCHK2,  ");
			sql.append(" PANELFENERRHCHK3,  ");
			sql.append(" PANELFENERRHCHK4,  ");
			sql.append(" PANELFENERRHCHK5,  ");
			sql.append(" PANELFENERRHCHK6,  ");
			sql.append(" FRONTRIGHTCHK1,  ");
			sql.append(" FRONTRIGHTCHK2,  ");
			sql.append(" FRONTRIGHTCHK3,  ");
			sql.append(" FRONTRIGHTCHK4,  ");
			sql.append(" FRONTRIGHTCHK5,  ");
			sql.append(" FRONTRIGHTCHK6,  ");
			sql.append(" FRONTRIGHTCHK7,  ");
			sql.append(" FRONTRIGHTCHK8,  ");
			sql.append(" FRONTRIGHTCHK9,  ");
			sql.append(" FRONTRIGHTCHK10,  ");
			sql.append(" FRONTRIGHTCHK11,  ");
			sql.append(" FRONTRIGHTCHK12,  ");
			sql.append(" FRONTRIGHTCHK13,  ");
			sql.append(" REARRIGHTCHK1,  ");
			sql.append(" REARRIGHTCHK2,  ");
			sql.append(" REARRIGHTCHK3,  ");
			sql.append(" REARRIGHTCHK4,  ");
			sql.append(" REARRIGHTCHK5,  ");
			sql.append(" REARRIGHTCHK6,  ");
			sql.append(" REARRIGHTCHK7,  ");
			sql.append(" REARRIGHTCHK8,  ");
			sql.append(" REARRIGHTCHK9,  ");
			sql.append(" REARRIGHTCHK10,  ");
			sql.append(" REARRIGHTCHK11 ,  ");
			sql.append(" FENDERRACHK1 ,  ");
			sql.append(" FENDERRACHK2 ,  ");
			sql.append(" FENDERRACHK3 ,  ");
			sql.append(" FENDERRACHK4 ,  ");
			sql.append(" FENDERRACHK5 ,  ");
			sql.append(" FENDERRACHK6 ,  ");
			sql.append(" RIGHTASTERNCHK1 ,  ");
			sql.append(" RIGHTASTERNCHK2 ,  ");
			sql.append(" RIGHTASTERNCHK3 ,  ");
			sql.append(" RIGHTASTERNCHK4 ,  ");
			sql.append(" RIGHTASTERNCHK5 ,  ");
			sql.append(" RIGHTASTERNCHK6 ,  ");
			sql.append(" LUGGAGECHK1 ,  ");
			sql.append(" LUGGAGECHK2 ,  ");
			sql.append(" LUGGAGECHK3 ,  ");
			sql.append(" LUGGAGECHK4 ,  ");
			sql.append(" LUGGAGECHK5 ,  ");
			sql.append(" LUGGAGECHK6 ,  ");
			sql.append(" LUGGAGECHK7 ,  ");
			sql.append(" LUGGAGECHK8 ,  ");
			sql.append(" LUGGAGECHK9 ,  ");
			sql.append(" LUGGAGECHK10 ,  ");
			sql.append(" FENDERLACHK1 ,  ");
			sql.append(" FENDERLACHK2 ,  ");
			sql.append(" FENDERLACHK3 ,  ");
			sql.append(" FENDERLACHK4 ,  ");
			sql.append(" FENDERLACHK5 ,  ");
			sql.append(" FENDERLACHK6 ,  ");
			sql.append(" REARLEFTCHK1 ,  ");
			sql.append(" REARLEFTCHK2 ,  ");
			sql.append(" REARLEFTCHK3 ,  ");
			sql.append(" REARLEFTCHK4 ,  ");
			sql.append(" REARLEFTCHK5 ,  ");
			sql.append(" REARLEFTCHK6 ,  ");
			sql.append(" REARLEFTCHK7 ,  ");
			sql.append(" REARLEFTCHK8 ,  ");
			sql.append(" REARLEFTCHK9 ,  ");
			sql.append(" REARLEFTCHK10 ,  ");
			sql.append(" REARLEFTCHK11 ,  ");
			sql.append(" CARROOFCHK1 ,  ");
			sql.append(" EXTERNALGRADE ,  ");
			sql.append(" INTERNALGRADE ,  ");
			sql.append(" ENGINEGRADE ,  ");
			sql.append(" ELECTRINICSGRADE ,  ");
			sql.append(" RESTSGRADE   ");
			sql.append(" )   ");
			sql.append(" VALUES ");
			sql.append(" (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?");
			sql.append(" ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?");
			sql.append(" ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?");
			sql.append(" ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?");
			sql.append(" ,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?) ");//135项
			
			ps = conn.prepareStatement(sql.toString());
			
			ps.setString(1, dto.getDisasterCars());
			ps.setString(2, dto.getFrontLeftChk1());
			ps.setString(3, dto.getFrontLeftChk2());
			ps.setString(4, dto.getFrontLeftChk3());
			ps.setString(5, dto.getFrontLeftChk4());
			ps.setString(6, dto.getFrontLeftChk5());
			ps.setString(7, dto.getFrontLeftChk6());
			ps.setString(8, dto.getFrontLeftChk7());
			ps.setString(9, dto.getFrontLeftChk8());
			ps.setString(10, dto.getFrontLeftChk9());
			ps.setString(11, dto.getInsideChk1());
			ps.setString(12, dto.getInsideChk2());
			ps.setString(13, dto.getInsideChk3());
			ps.setString(14, dto.getInsideChk4());
			ps.setString(15, dto.getInsideChk5());
			ps.setString(16, dto.getInsideChk6());
			ps.setString(17, dto.getInsideChk7());
			ps.setString(18, dto.getInsideChk8());
			ps.setString(19, dto.getInsideChk9());
			ps.setString(20, dto.getInsideChk10());
			ps.setString(21, dto.getInsideChk11());
			ps.setString(22, dto.getInsideChk12());
			ps.setString(23, dto.getInsideChk13());
			ps.setString(24, dto.getInsideChk14());
			ps.setString(25, dto.getInsideChk15());
			ps.setString(26, dto.getInsideChk16());
			ps.setString(27, dto.getInsideChk17());
			ps.setString(28, dto.getInsideChk18());
			ps.setString(29, dto.getInsideChk19());
			ps.setString(30, dto.getInsideChk20());
			ps.setString(31, dto.getInsideChk21());
			ps.setString(32, dto.getInsideChk22());
			ps.setString(33, dto.getInsideChk23());
			ps.setString(34, dto.getInsideChk24());
			ps.setString(35, dto.getInsideChk25());
			ps.setString(36, dto.getInsideChk26());
			ps.setString(37, dto.getInsideChk27());
			ps.setString(38, dto.getInsideChk28());
			ps.setString(39, dto.getInsideChk29());
			ps.setString(40, dto.getInsideChk30());
			ps.setString(41, dto.getPanelFenerLhChk1());
			ps.setString(42, dto.getPanelFenerLhChk2());
			ps.setString(43, dto.getPanelFenerLhChk3());
			ps.setString(44, dto.getPanelFenerLhChk4());
			ps.setString(45, dto.getPanelFenerLhChk5());
			ps.setString(46, dto.getPanelFenerLhChk6());
			ps.setString(47, dto.getDeadAheadChk1());
			ps.setString(48, dto.getDeadAheadChk2());
			ps.setString(49, dto.getDeadAheadChk3());
			ps.setString(50, dto.getDeadAheadChk4());
			ps.setString(51, dto.getDeadAheadChk5());
			ps.setString(52, dto.getDeadAheadChk6());
			ps.setString(53, dto.getEngineChk1());
			ps.setString(54, dto.getEngineChk2());
			ps.setString(55, dto.getEngineChk3());
			ps.setString(56, dto.getEngineChk4());
			ps.setString(57, dto.getEngineChk5());
			ps.setString(58, dto.getEngineChk6());
			ps.setString(59, dto.getEngineChk7());
			ps.setString(60, dto.getEngineChk8());
			ps.setString(61, dto.getPanelFenerRhChk1());
			ps.setString(62, dto.getPanelFenerRhChk2());
			ps.setString(63, dto.getPanelFenerRhChk3());
			ps.setString(64, dto.getPanelFenerRhChk4());
			ps.setString(65, dto.getPanelFenerRhChk5());
			ps.setString(66, dto.getPanelFenerRhChk6());
			ps.setString(67, dto.getFrontRightChk1());
			ps.setString(68, dto.getFrontRightChk2());
			ps.setString(69, dto.getFrontRightChk3());
			ps.setString(70, dto.getFrontRightChk4());
			ps.setString(71, dto.getFrontRightChk5());
			ps.setString(72, dto.getFrontRightChk6());
			ps.setString(73, dto.getFrontRightChk7());
			ps.setString(74, dto.getFrontRightChk8());
			ps.setString(75, dto.getFrontRightChk9());
			ps.setString(76, dto.getFrontRightChk10());
			ps.setString(77, dto.getFrontRightChk11());
			ps.setString(78, dto.getFrontRightChk12());
			ps.setString(79, dto.getFrontRightChk13());
			ps.setString(80, dto.getRearRightChk1());
			ps.setString(81, dto.getRearRightChk2());
			ps.setString(82, dto.getRearRightChk3());
			ps.setString(83, dto.getRearRightChk4());
			ps.setString(84, dto.getRearRightChk5());
			ps.setString(85, dto.getRearRightChk6());
			ps.setString(86, dto.getRearRightChk7());
			ps.setString(87, dto.getRearRightChk8());
			ps.setString(88, dto.getRearRightChk9());
			ps.setString(89, dto.getRearRightChk10());
			ps.setString(90, dto.getRearRightChk11());
			ps.setString(91, dto.getFenderRaChk1());
			ps.setString(92, dto.getFenderRaChk2());
			ps.setString(93, dto.getFenderRaChk3());
			ps.setString(94, dto.getFenderRaChk4());
			ps.setString(95, dto.getFenderRaChk5());
			ps.setString(96, dto.getFenderRaChk6());
			ps.setString(97, dto.getRightAsternChk1());
			ps.setString(98, dto.getRightAsternChk2());
			ps.setString(99, dto.getRightAsternChk3());
			ps.setString(100, dto.getRightAsternChk4());
			ps.setString(101, dto.getRightAsternChk5());
			ps.setString(102, dto.getRightAsternChk6());
			ps.setString(103, dto.getLuggageChk1());
			ps.setString(104, dto.getLuggageChk2());
			ps.setString(105, dto.getLuggageChk3());
			ps.setString(106, dto.getLuggageChk4());
			ps.setString(107, dto.getLuggageChk5());
			ps.setString(108, dto.getLuggageChk6());
			ps.setString(109, dto.getLuggageChk7());
			ps.setString(110, dto.getLuggageChk8());
			ps.setString(111, dto.getLuggageChk9());
			ps.setString(112, dto.getLuggageChk10());
			ps.setString(113, dto.getFenderLaChk1());
			ps.setString(114, dto.getFenderLaChk2());
			ps.setString(115, dto.getFenderLaChk3());
			ps.setString(116, dto.getFenderLaChk4());
			ps.setString(117, dto.getFenderLaChk5());
			ps.setString(118, dto.getFenderLaChk6());
			ps.setString(119, dto.getRearLeftChk1());
			ps.setString(120, dto.getRearLeftChk2());
			ps.setString(121, dto.getRearLeftChk3());
			ps.setString(122, dto.getRearLeftChk4());
			ps.setString(123, dto.getRearLeftChk5());
			ps.setString(124, dto.getRearLeftChk6());
			ps.setString(125, dto.getRearLeftChk7());
			ps.setString(126, dto.getRearLeftChk8());
			ps.setString(127, dto.getRearLeftChk9());
			ps.setString(128, dto.getRearLeftChk10());
			ps.setString(129, dto.getRearLeftChk11());
			ps.setString(130, dto.getCarRoofChk1());
			ps.setInt(131, (int)dto.getExternalGrade());
			ps.setInt(132, (int)dto.getInternalGrade());
			ps.setInt(133, (int)dto.getEngineGrade());
			ps.setInt(134, (int)dto.getElectrinicsGrade());
			ps.setInt(135, (int)dto.getRestsGrade());
			
			ps.executeUpdate();	
			
			rs = ps.getGeneratedKeys();
			rs.next();
			carDetectId = rs.getInt(1);

		} catch (SQLException e) {
			throw new TmsDaoException(e.toString());
		} finally {
			super.close(rs, ps);
		}
		return carDetectId;				
		
	}
	/**
	 * 
	 * 根据检测ID查询检测信息
	 * @throws TmsDaoException 
	 */
	@Override
	public TmsDetectNormalDto findCarDetectInfoById(int id) throws TmsDaoException {
		PreparedStatement ps = null;
		ResultSet rs = null;
		TmsDetectNormalDto dto = null;
		try {
			conn = super.getConnection();

			StringBuffer sql = new StringBuffer();
			sql.append("SELECT     		 	");
			sql.append(" ID,  				");
			sql.append(" DISASTERCARS,  	");
			sql.append(" FRONTLEFTCHK1,  	");
			sql.append(" FRONTLEFTCHK2,  	");
			sql.append(" FRONTLEFTCHK3,  	");
			sql.append(" FRONTLEFTCHK4,  	");
			sql.append(" FRONTLEFTCHK5, 	");
			sql.append(" FRONTLEFTCHK6,  	");
			sql.append(" FRONTLEFTCHK7,  	");
			sql.append(" FRONTLEFTCHK8,  	");
			sql.append(" FRONTLEFTCHK9,  	");
			sql.append(" INSIDECHK1,  		");
			sql.append(" INSIDECHK2,  		");
			sql.append(" INSIDECHK3,  		");
			sql.append(" INSIDECHK4,  		");
			sql.append(" INSIDECHK5,  		");
			sql.append(" INSIDECHK6,  		");
			sql.append(" INSIDECHK7,  		");
			sql.append(" INSIDECHK8,  		");
			sql.append(" INSIDECHK9,  		");
			sql.append(" INSIDECHK10,  		");
			sql.append(" INSIDECHK11,  		");
			sql.append(" INSIDECHK12,  		");
			sql.append(" INSIDECHK13,  		");
			sql.append(" INSIDECHK14,  		");
			sql.append(" INSIDECHK15,  		");
			sql.append(" INSIDECHK16,  		");
			sql.append(" INSIDECHK17,  		");
			sql.append(" INSIDECHK18,  		");
			sql.append(" INSIDECHK19,  		");
			sql.append(" INSIDECHK20,  		");
			sql.append(" INSIDECHK21,  		");
			sql.append(" INSIDECHK22,  		");
			sql.append(" INSIDECHK23,  		");
			sql.append(" INSIDECHK24,  		");
			sql.append(" INSIDECHK25,  		");
			sql.append(" INSIDECHK26,  		");
			sql.append(" INSIDECHK27,  		");
			sql.append(" INSIDECHK28,  		");
			sql.append(" INSIDECHK29,  		");
			sql.append(" INSIDECHK30,  		");
			sql.append(" PANELFENERLHCHK1,  ");
			sql.append(" PANELFENERLHCHK2,  ");
			sql.append(" PANELFENERLHCHK3,  ");
			sql.append(" PANELFENERLHCHK4,  ");
			sql.append(" PANELFENERLHCHK5,  ");
			sql.append(" PANELFENERLHCHK6,  ");
			sql.append(" DEADAHEADCHK1,  	");
			sql.append(" DEADAHEADCHK2,  	");
			sql.append(" DEADAHEADCHK3,  	");
			sql.append(" DEADAHEADCHK4,  	");
			sql.append(" DEADAHEADCHK5,  	");
			sql.append(" DEADAHEADCHK6,  	");
			sql.append(" ENGINECHK1,  		");
			sql.append(" ENGINECHK2,  		");
			sql.append(" ENGINECHK3, 	 	");
			sql.append(" ENGINECHK4,  		");
			sql.append(" ENGINECHK5,  		");
			sql.append(" ENGINECHK6,  		");
			sql.append(" ENGINECHK7,  		");
			sql.append(" ENGINECHK8,  		");
			sql.append(" PANELFENERRHCHK1,  ");
			sql.append(" PANELFENERRHCHK2,  ");
			sql.append(" PANELFENERRHCHK3,  ");
			sql.append(" PANELFENERRHCHK4,  ");
			sql.append(" PANELFENERRHCHK5,  ");
			sql.append(" PANELFENERRHCHK6,  ");
			sql.append(" FRONTRIGHTCHK1,  	");
			sql.append(" FRONTRIGHTCHK2,  	");
			sql.append(" FRONTRIGHTCHK3,  	");
			sql.append(" FRONTRIGHTCHK4,  	");
			sql.append(" FRONTRIGHTCHK5,  	");
			sql.append(" FRONTRIGHTCHK6,  	");
			sql.append(" FRONTRIGHTCHK7,  	");
			sql.append(" FRONTRIGHTCHK8,  	");
			sql.append(" FRONTRIGHTCHK9,  	");
			sql.append(" FRONTRIGHTCHK10,  	");
			sql.append(" FRONTRIGHTCHK11,  	");
			sql.append(" FRONTRIGHTCHK12,  	");
			sql.append(" FRONTRIGHTCHK13,  	");
			sql.append(" REARRIGHTCHK1,  	");
			sql.append(" REARRIGHTCHK2,  	");
			sql.append(" REARRIGHTCHK3,  	");
			sql.append(" REARRIGHTCHK4,  	");
			sql.append(" REARRIGHTCHK5,  	");
			sql.append(" REARRIGHTCHK6,  	");
			sql.append(" REARRIGHTCHK7,  	");
			sql.append(" REARRIGHTCHK8,  	");
			sql.append(" REARRIGHTCHK9,  	");
			sql.append(" REARRIGHTCHK10,  	");
			sql.append(" REARRIGHTCHK11 ,  	");
			sql.append(" FENDERRACHK1 ,  	");
			sql.append(" FENDERRACHK2 ,  	");
			sql.append(" FENDERRACHK3 ,  	");
			sql.append(" FENDERRACHK4 ,  	");
			sql.append(" FENDERRACHK5 ,  	");
			sql.append(" FENDERRACHK6 ,  	");
			sql.append(" RIGHTASTERNCHK1 ,  ");
			sql.append(" RIGHTASTERNCHK2 ,  ");
			sql.append(" RIGHTASTERNCHK3 ,  ");
			sql.append(" RIGHTASTERNCHK4 ,  ");
			sql.append(" RIGHTASTERNCHK5 ,  ");
			sql.append(" RIGHTASTERNCHK6 ,  ");
			sql.append(" LUGGAGECHK1 ,  	");
			sql.append(" LUGGAGECHK2 ,  	");
			sql.append(" LUGGAGECHK3 ,  	");
			sql.append(" LUGGAGECHK4 ,  	");
			sql.append(" LUGGAGECHK5 ,  	");
			sql.append(" LUGGAGECHK6 ,  	");
			sql.append(" LUGGAGECHK7 ,  	");
			sql.append(" LUGGAGECHK8 ,  	");
			sql.append(" LUGGAGECHK9 ,  	");
			sql.append(" LUGGAGECHK10 ,  	");
			sql.append(" FENDERLACHK1 ,  	");
			sql.append(" FENDERLACHK2 ,  	");
			sql.append(" FENDERLACHK3 ,  	");
			sql.append(" FENDERLACHK4 ,  	");
			sql.append(" FENDERLACHK5 ,  	");
			sql.append(" FENDERLACHK6 ,  	");
			sql.append(" REARLEFTCHK1 ,  	");
			sql.append(" REARLEFTCHK2 ,  	");
			sql.append(" REARLEFTCHK3 ,  	");
			sql.append(" REARLEFTCHK4 ,  	");
			sql.append(" REARLEFTCHK5 ,  	");
			sql.append(" REARLEFTCHK6 ,  	");
			sql.append(" REARLEFTCHK7 ,  	");
			sql.append(" REARLEFTCHK8 ,  	");
			sql.append(" REARLEFTCHK9 ,  	");
			sql.append(" REARLEFTCHK10 ,  	");
			sql.append(" REARLEFTCHK11 ,  	");
			sql.append(" CARROOFCHK1 ,  	");
			sql.append(" EXTERNALGRADE ,  	");
			sql.append(" INTERNALGRADE ,  	");
			sql.append(" ENGINEGRADE ,  	");
			sql.append(" ELECTRINICSGRADE , ");
			sql.append(" RESTSGRADE   		");
			sql.append(" FROM   	 ");
			sql.append(TmsTableNames.TMS_DETECT_NORMAL);
			sql.append("    WHERE  id=? ");

			ps = conn.prepareStatement(sql.toString());
			ps.setInt(1, id);

			// 执行sql
			rs = ps.executeQuery();

			while (rs.next()) {
				dto = new TmsDetectNormalDto();
				dto.setId(rs.getInt("ID"));
				dto.setDisasterCars(rs.getString("DISASTERCARS"));
				dto.setFrontLeftChk1(rs.getString("FRONTLEFTCHK1"));
				dto.setFrontLeftChk2(rs.getString("FRONTLEFTCHK2"));
				dto.setFrontLeftChk3(rs.getString("FRONTLEFTCHK3"));
				dto.setFrontLeftChk4(rs.getString("FRONTLEFTCHK4"));
				dto.setFrontLeftChk5(rs.getString("FRONTLEFTCHK5"));
				dto.setFrontLeftChk6(rs.getString("FRONTLEFTCHK6"));
				dto.setFrontLeftChk7(rs.getString("FRONTLEFTCHK7"));
				dto.setFrontLeftChk8(rs.getString("FRONTLEFTCHK8"));
				dto.setFrontLeftChk9(rs.getString("FRONTLEFTCHK9"));
				dto.setInsideChk1(rs.getString("INSIDECHK1"));
				dto.setInsideChk2(rs.getString("INSIDECHK2"));
				dto.setInsideChk3(rs.getString("INSIDECHK3"));
				dto.setInsideChk4(rs.getString("INSIDECHK4"));
				dto.setInsideChk5(rs.getString("INSIDECHK5"));
				dto.setInsideChk6(rs.getString("INSIDECHK6"));
				dto.setInsideChk7(rs.getString("INSIDECHK7"));
				dto.setInsideChk8(rs.getString("INSIDECHK8"));
				dto.setInsideChk9(rs.getString("INSIDECHK9"));
				dto.setInsideChk10(rs.getString("INSIDECHK10"));
				dto.setInsideChk11(rs.getString("INSIDECHK11"));
				dto.setInsideChk12(rs.getString("INSIDECHK12"));
				dto.setInsideChk13(rs.getString("INSIDECHK13"));
				dto.setInsideChk14(rs.getString("INSIDECHK14"));
				dto.setInsideChk15(rs.getString("INSIDECHK15"));
				dto.setInsideChk16(rs.getString("INSIDECHK16"));
				dto.setInsideChk17(rs.getString("INSIDECHK17"));
				dto.setInsideChk18(rs.getString("INSIDECHK18"));
				dto.setInsideChk19(rs.getString("INSIDECHK19"));
				dto.setInsideChk20(rs.getString("INSIDECHK20"));
				dto.setInsideChk21(rs.getString("INSIDECHK21"));
				dto.setInsideChk22(rs.getString("INSIDECHK22"));
				dto.setInsideChk23(rs.getString("INSIDECHK23"));
				dto.setInsideChk24(rs.getString("INSIDECHK24"));
				dto.setInsideChk25(rs.getString("INSIDECHK25"));
				dto.setInsideChk26(rs.getString("INSIDECHK26"));
				dto.setInsideChk27(rs.getString("INSIDECHK27"));
				dto.setInsideChk28(rs.getString("INSIDECHK28"));
				dto.setInsideChk29(rs.getString("INSIDECHK29"));
				dto.setInsideChk30(rs.getString("INSIDECHK30"));
				dto.setPanelFenerLhChk1(rs.getString("PANELFENERLHCHK1"));
				dto.setPanelFenerLhChk2(rs.getString("PANELFENERLHCHK2"));
				dto.setPanelFenerLhChk3(rs.getString("PANELFENERLHCHK3"));
				dto.setPanelFenerLhChk4(rs.getString("PANELFENERLHCHK4"));
				dto.setPanelFenerLhChk5(rs.getString("PANELFENERLHCHK5"));
				dto.setPanelFenerLhChk6(rs.getString("PANELFENERLHCHK6"));
				dto.setDeadAheadChk1(rs.getString("DEADAHEADCHK1"));
				dto.setDeadAheadChk2(rs.getString("DEADAHEADCHK2"));
				dto.setDeadAheadChk3(rs.getString("DEADAHEADCHK3"));
				dto.setDeadAheadChk4(rs.getString("DEADAHEADCHK4"));
				dto.setDeadAheadChk5(rs.getString("DEADAHEADCHK5"));
				dto.setDeadAheadChk6(rs.getString("DEADAHEADCHK6"));
				dto.setEngineChk1(rs.getString("ENGINECHK1"));
				dto.setEngineChk2(rs.getString("ENGINECHK2"));
				dto.setEngineChk3(rs.getString("ENGINECHK3"));
				dto.setEngineChk4(rs.getString("ENGINECHK4"));
				dto.setEngineChk5(rs.getString("ENGINECHK5"));
				dto.setEngineChk6(rs.getString("ENGINECHK6"));
				dto.setEngineChk7(rs.getString("ENGINECHK7"));
				dto.setEngineChk8(rs.getString("ENGINECHK8"));
				dto.setPanelFenerRhChk1(rs.getString("PANELFENERRHCHK1"));
				dto.setPanelFenerRhChk2(rs.getString("PANELFENERRHCHK2"));
				dto.setPanelFenerRhChk3(rs.getString("PANELFENERRHCHK3"));
				dto.setPanelFenerRhChk4(rs.getString("PANELFENERRHCHK4"));
				dto.setPanelFenerRhChk5(rs.getString("PANELFENERRHCHK5"));
				dto.setPanelFenerRhChk6(rs.getString("PANELFENERRHCHK6"));
				dto.setFrontRightChk1(rs.getString("FRONTRIGHTCHK1"));
				dto.setFrontRightChk2(rs.getString("FRONTRIGHTCHK2"));
				dto.setFrontRightChk3(rs.getString("FRONTRIGHTCHK3"));
				dto.setFrontRightChk4(rs.getString("FRONTRIGHTCHK4"));
				dto.setFrontRightChk5(rs.getString("FRONTRIGHTCHK5"));
				dto.setFrontRightChk6(rs.getString("FRONTRIGHTCHK6"));
				dto.setFrontRightChk7(rs.getString("FRONTRIGHTCHK7"));
				dto.setFrontRightChk8(rs.getString("FRONTRIGHTCHK8"));
				dto.setFrontRightChk9(rs.getString("FRONTRIGHTCHK9"));
				dto.setFrontRightChk10(rs.getString("FRONTRIGHTCHK10"));
				dto.setFrontRightChk11(rs.getString("FRONTRIGHTCHK11"));
				dto.setFrontRightChk12(rs.getString("FRONTRIGHTCHK12"));
				dto.setFrontRightChk13(rs.getString("FRONTRIGHTCHK13"));
				dto.setRearRightChk1(rs.getString("REARRIGHTCHK1"));
				dto.setRearRightChk2(rs.getString("REARRIGHTCHK2"));
				dto.setRearRightChk3(rs.getString("REARRIGHTCHK3"));
				dto.setRearRightChk4(rs.getString("REARRIGHTCHK4"));
				dto.setRearRightChk5(rs.getString("REARRIGHTCHK5"));
				dto.setRearRightChk6(rs.getString("REARRIGHTCHK6"));
				dto.setRearRightChk7(rs.getString("REARRIGHTCHK7"));
				dto.setRearRightChk8(rs.getString("REARRIGHTCHK8"));
				dto.setRearRightChk9(rs.getString("REARRIGHTCHK9"));
				dto.setRearRightChk10(rs.getString("REARRIGHTCHK10"));
				dto.setRearRightChk11(rs.getString("REARRIGHTCHK11"));
				dto.setFenderRaChk1(rs.getString("FENDERRACHK1"));
				dto.setFenderRaChk2(rs.getString("FENDERRACHK2"));
				dto.setFenderRaChk3(rs.getString("FENDERRACHK3"));
				dto.setFenderRaChk4(rs.getString("FENDERRACHK4"));
				dto.setFenderRaChk5(rs.getString("FENDERRACHK5"));
				dto.setFenderRaChk6(rs.getString("FENDERRACHK6"));
				dto.setRightAsternChk1(rs.getString("RIGHTASTERNCHK1"));
				dto.setRightAsternChk2(rs.getString("RIGHTASTERNCHK2"));
				dto.setRightAsternChk3(rs.getString("RIGHTASTERNCHK3"));
				dto.setRightAsternChk4(rs.getString("RIGHTASTERNCHK4"));
				dto.setRightAsternChk5(rs.getString("RIGHTASTERNCHK5"));
				dto.setRightAsternChk6(rs.getString("RIGHTASTERNCHK6"));
				dto.setLuggageChk1(rs.getString("LUGGAGECHK1"));
				dto.setLuggageChk2(rs.getString("LUGGAGECHK2"));
				dto.setLuggageChk3(rs.getString("LUGGAGECHK3"));
				dto.setLuggageChk4(rs.getString("LUGGAGECHK4"));
				dto.setLuggageChk5(rs.getString("LUGGAGECHK5"));
				dto.setLuggageChk6(rs.getString("LUGGAGECHK6"));
				dto.setLuggageChk7(rs.getString("LUGGAGECHK7"));
				dto.setLuggageChk8(rs.getString("LUGGAGECHK8"));
				dto.setLuggageChk9(rs.getString("LUGGAGECHK9"));
				dto.setLuggageChk10(rs.getString("LUGGAGECHK10"));
				dto.setFenderLaChk1(rs.getString("FENDERLACHK1"));
				dto.setFenderLaChk2(rs.getString("FENDERLACHK2"));
				dto.setFenderLaChk3(rs.getString("FENDERLACHK3"));
				dto.setFenderLaChk4(rs.getString("FENDERLACHK4"));
				dto.setFenderLaChk5(rs.getString("FENDERLACHK5"));
				dto.setFenderLaChk6(rs.getString("FENDERLACHK6"));
				dto.setRearLeftChk1(rs.getString("REARLEFTCHK1"));
				dto.setRearLeftChk2(rs.getString("REARLEFTCHK2"));
				dto.setRearLeftChk3(rs.getString("REARLEFTCHK3"));
				dto.setRearLeftChk4(rs.getString("REARLEFTCHK4"));
				dto.setRearLeftChk5(rs.getString("REARLEFTCHK5"));
				dto.setRearLeftChk6(rs.getString("REARLEFTCHK6"));
				dto.setRearLeftChk7(rs.getString("REARLEFTCHK7"));
				dto.setRearLeftChk8(rs.getString("REARLEFTCHK8"));
				dto.setRearLeftChk9(rs.getString("REARLEFTCHK9"));
				dto.setRearLeftChk10(rs.getString("REARLEFTCHK10"));
				dto.setRearLeftChk11(rs.getString("REARLEFTCHK11"));
				dto.setCarRoofChk1(rs.getString("CARROOFCHK1"));
				dto.setExternalGrade(rs.getDouble("EXTERNALGRADE"));
				dto.setInternalGrade(rs.getDouble("INTERNALGRADE"));
				dto.setEngineGrade(rs.getDouble("ENGINEGRADE"));
				dto.setElectrinicsGrade(rs.getDouble("ELECTRINICSGRADE"));
				dto.setRestsGrade(rs.getDouble("RESTSGRADE"));

			}
		} catch (SQLException e) {
			throw new TmsDaoException(e.toString());

		} finally {
			super.close(rs, ps);
		}
		return dto;
	}


	
}
